import request from '@/router/axios';
import config from '@/config/website'

//列表
export const projectStartList = (current, size, equipment) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/page',
        method: 'get',
        params: {
            current,
            size,
            ...equipment
        }
    })
}


//新建
export const projectStartAdd = (data) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/save',
        method: 'post',
        data
    })
}
//修改
export const projectStartUpdate = (data) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/update',
        method: 'post',
        data
    })
}
//查看
export const projectStartView = (id) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/detail',
        method: 'get',
        params: {
            id
        }
    })
}

//删除
export const projectStartDel = (ids) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/remove',
        method: 'post',
        params: {
            ids
        }
    })
}
//查询项目名称
export const getProName = () => {
    return request({
        url: '/api/hg-public/hg_project/potentialProject/selectProName',
        method: 'get',
    })
}
//项目组成员
export const getMembers = (proNumber) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/selctProMember',
        method: 'get',
        params: {
            proNumber
        }
    })
}
//重要时间节点保存
export const importTimeAdd = (data) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/saveTimenode',
        method: 'post',
        data
    })
}
//重要时间节点模板列表
export const importTimeMode = () => {
    return request({
        url: '/api/hg-public/timenodes/list',
        method: 'get',
    })
}
//重要时间节点查看列表
export const importTimeView = (custPrdDemandId) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/selectTimenode',
        method: 'get',
        params: {
            custPrdDemandId
        }
    })
}
//提交
export const projectStartSubmit = (id) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/start-process',
        method: 'post',
        params: {
            id,
        }
    })
}
//项目组成员
export const getPartners = (projectId) => {
    return request({
        url: '/api/hg-public/hg_project/prjProStart/selctProMember',
        method: 'get',
        params: {
            projectId
        }
    })
}
//远程搜索
export const searchContract = (contractNumber, customerId) => {
    return request({
        url: '/api/blade-sale/hg_sale/saleContract/selectSaleContract',
        method: 'get',
        params: {
            contractNumber,
            customerId
        }
    })
}

export const customerSave = (potentialLinkman) => {
    return request({
        url: '/api/hg-public/potentiallinkman/save',
        method: 'post',
        data: potentialLinkman
    })
}

export const customerRemove = (ids) => {
    return request({
        url: '/api/hg-public/potentiallinkman/remove',
        method: 'post',
        params: { ids, }
    })
}
//获取潜在项目详情
export const getPotentialDetail = (id) => {
    return request({
        url: '/api/hg-public/hg_project/potentialProject/detail',
        method: 'get',
        params: {
            id
        }
    })
}